<%@ page language="java" contentType="text/html; charset=utf8"
	pageEncoding="utf8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<h3><spring:message code="label.contacts" /></h3>


	<table class="red-table">
		<tr>
			<th><spring:message code="label.id" /></th>
			<th><spring:message code="label.nickname" /></th>
			<th><spring:message code="label.fio" /></th>
			<th><spring:message code="label.phone" /></th>
			<th><spring:message code="label.email" /></th>	
			<th><spring:message code="label.warehouse" /></th>								
			<th>&nbsp;</th>
			<th>&nbsp;</th>
		</tr>
		<c:if test="${!empty contactList}">
			<c:forEach items="${contactList}" var="contact">
				<tr>
					<td>${contact.contactId}</td>
					<td>${contact.contactNickName}</td>
					<td>${contact.contactFirstName}</td>
					<td>${contact.contactTelephone}</td>
					<td>${contact.contactEmail}</td>
					<td>${contact.contactWarehouse}</td>								
					<td style="width: 50px;"><a href="index?edit=contact&id=${contact.contactId}"><spring:message code="label.edit" /></a></td>
					<td style="width: 50px;"><a href="deleteContact/${contact.contactId}"><spring:message code="label.delete" /></a></td>
				</tr>
			</c:forEach>
		</c:if>
	</table>


<div style="margin-left: 500px; margin-top: 20px;">
	<a class="but_1"  href="<c:url value="/index?view=contact" />">
		<spring:message code="label.add" />
	</a>
</div>


</body>
</html>